#pragma once

#include <Windows.h>
#include <Mmsystem.h>
#pragma comment(lib,"Winmm.lib")

#include <fstream>
#include <iostream>
#include <list>
#include <queue>
#include <string>
#include <vector>
using namespace std;

#include "clkXmlElement.h"

enum CLK_XMLELEMENT
{
	CLK_XMLELEMENT_NONE,
	CLK_XMLELEMENT_DECL,
	CLK_XMLELEMENT_START,
	CLK_XMLELEMENT_END,

	CLK_XMLELEMENT_NAME,
	CLK_XMLELEMENT_DATA,
	CLK_XMLELEMENT_ATTR_NAME,
	CLK_XMLELEMENT_ATTR_DATA,
};

class clkXmlDocument
{
private:
	bool m_opened;
	string m_path;
	string m_source;
	clkXmlElement* m_root;
	vector<clkXmlElement*> m_elements;
public:
	clkXmlDocument();
	clkXmlDocument(string a_file);
	~clkXmlDocument();

	void open(string m_file);
	void close();
	void build(clkXmlElement* a_element, int& a_index);

	clkXmlElement* getRoot(){return m_root;}
};